<?php
	session_start();
	$status = false;
	include_once 'includes/include_classes.php';
	if((ISSET($_SESSION["user"])) && (!EMPTY($_SESSION["user"]))){
		$user = unserialize($_SESSION["user"]);
		$status = true;
	}
?>
<!doctype html>
<html>
<head>
	<!-- Include CSS -->
	<link rel="stylesheet" href="style/romantics.css" type="text/css" />
	<!-- Include jQuery -->
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js"></script>
	<!-- Include Nivo -->
	<script type="text/javascript" src="includes/nivo/jquery.nivo.slider.pack.js"></script>
	<link rel="stylesheet" href="includes/nivo/nivo-slider.css" type="text/css" media="screen" charset="utf-8" />
	<!-- Set Charset -->
	<meta charset="UTF-8" />
	
	<title>Romantics | Shoppen met appies.</title>
</head>
<body>
	<header>
		<h1>Romantics BV</h1>
		<nav>
			<ul>
				<li><a href="index.php">Home</a></li>
				<?php if($status == true){?><li><a href="includes/logout.php">Logout</a></li><?php }?>
				<li><a href="menu.php">Menu 2</a></li>
				<li><a href="menu.php">Menu 3</a></li>
				<li><a href="menu.php">Menu 4</a></li>
			</ul>
		</nav>
	</header>
	<div id="main">
		<div id="home_header" class="row">
			<div class="slider-wrapper">
				<div id="slider"  class="nivoSlider">				
					<img title="Heerlijke chocolaatjes." alt="Heerlijke chocolaatjes." src="images/slides/choc-swetheart.jpg" />
					<img title="Heerlijk badschuim." alt="Heerlijk badschuim." src="images/slides/romato_1.jpg" />
				</div>
			</div>
			<div id="home_text">
				<h2>Voor jou, en die andere pannekoek.</h2>
				<hr/>
				<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
				Curabitur ac mi non massa aliquet pharetra. 
				Cras sit amet risus eu nisi pulvinar placerat ac sit amet nisl. In blandit ultrices erat, in malesuada leo lacinia vel. 
				Fusce eget hendrerit odio. Curabitur non euismod mauris. Donec facilisis convallis eros ac gravida. 
				Nullam dolor enim, bibendum a ornare eu, rutrum nec massa. Aliquam erat volutpat. 
				Proin vulputate euismod felis, non hendrerit nibh elementum nec.</p>
				<p>Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. 
				Pellentesque lobortis rutrum mi eu pellentesque. Donec vel elit sed est adipiscing dignissim. 
				Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. 
				Integer adipiscing diam quis felis rhoncus eget fermentum odio tincidunt.</p>
			</div>
		</div>
		<div id="home_content" class="row">
			<div id="login">
				<h2>Login</h2>
				<hr />
				<?php
				if($status){
					echo "<h2>Loged in!</h2>";
					echo "<p>Welkom ". $user -> firstname ." ". $user -> insertion ." ". $user -> lastname ."</p>";
				} else {
				?>
					<form name="login" action="includes/login.php" method="post">
						<label for="username">Username</label><br />
						<input type="text" name="username" id="username" size="35px" /><br /><br />
						<label for="password">Password</label><br />
						<input type="password" name="password" id="password" size="35px" /><br /><br />
						<input type="submit" name="submit" value="Login" />
					</form>
				<?php
				} 
				?>
			</div>
			<div id="register">
				<h2>Register</h2>
				<hr />
				<form name="register" action="includes/register.php" method="post">
				<table>
					<tr>
						<td><label for="firstname">Firstname</label><br/><input type="text" name="firstname" id="firstname" size="20px" /></td>
						<td><label for="insertion">Insertion</label><br /><input type="text" name="insertion" id="insertion" size="9px" /></td>
						<td><label for="lastname">Lastname</label><br /><input type="text" name="lastname" id="lastname" size="35px" /></td>
					</tr>
				</table>
				<table>
					<tr>
						<td><label for="dateofbirth">Date of birth</label><br /><input type="text" name="dateofbirth" id="dateofbirth" size="35px" /></td>
					</tr>
				</table>
				<table>
					<tr>
						<td><label for="emailaddress">Emailaddress</label><br /><input type="text" name="emailaddress" id="emailaddress" size="35px" /></td>
						<td><label for="phonenumber">Phonenumber</label><br /><input type="text" name="phonenumber" id="phonenumber" size="35px" /></td>
					</tr>
				</table>
				<table>
					<tr>
						<td><label for="companyname">Companyname</label><br /><input type="text" name="companyname" id="companyname" size="35px" /></td>
					</tr>
				</table>
				<table>
					<tr>
						<td><label for="address">Address</label><br /><input type="text" name="address" id="address" size="35px" /></td>
						<td><label for="addition">Addition</label><br /><input type="text" name="addition" id="addition" size="9px" /></td>
					</tr>
					<tr>
						<td><label for="zipcode">Zipcode</label><br /><input type="text" name="zipcode" id="zipcode" size="35px" /></td>
						<td><label for="country">Country</label><br /><input type="text" name="country" id="country" size="35px" /></td>
					</tr>
				</table>
				<table>
					<tr>
						<td><label for="username">Username</label><br /><input type="text" name="username" id="username" size="35px" /></td>
						<td><label for="password">Password</label><br /><input type="password" name="password" id="password" size="35px" /></td>
					</tr>
					<tr>
						<td><br /><input type="submit" name="submit" value="Register" /></td>
						<td><label for="password2">Retype password</label><br /><input type="password" name="password2" id="password2" size="35px" /></td>
					</tr>
				</table>
				</form>
			</div>
		</div>
	</div>
	<footer><hr />Romantics BV | 0123-456789 | blastraat 123 - Arnhem</footer>
</body>
</html>